% V20210224 - 8.2 GW_ADD_BUTTON INCLUDE "GW.bas" % Create a page. p = GW_NEW_PAGE() % Prepare title bar string. title$ = GW_ADD_BAR_TITLE$("Button Example") % Add title to page. GW_ADD_TITLEBAR(p, title$) % Add descriptive text. GW_ADD_TEXT(p, "This is an example of the BUTTON control:") % Now add the button control. GW_ADD_BUTTON(p, "BASIC! oficial forum", ~ "https://www.tapatalk.com/groups/rfobasic") % Add more descriptive text. GW_ADD_TEXT(p, "You can also use a BUTTON control to open a dialog:") % Let's prepare the dialog. ARRAY.LOAD a$[], "OK" dlg = GW_ADD_DIALOG_MESSAGE(p, "Dialog", "Message", a$[]) % Now add the next button control. GW_ADD_BUTTON(p, "Show dialog", GW_SHOW_DIALOG$(dlg)) % Add last descriptive text. GW_ADD_TEXT(p, "...or a panel:") % Now prepare the panel. panel = GW_ADD_PANEL(p, "Hello, World!") % And the last button control. GW_ADD_BUTTON(p, "Open side panel", GW_SHOW_PANEL$(panel)) % Now show the page. GW_RENDER(p) DO % Wait for user action. r$ = GW_WAIT_ACTION$() % Place here any necessary code to process user actions. % Example feedback. POPUP r$ % End when BACK key is pressed. UNTIL r$ = "BACK" END "End of Button example."